<!DOCTYPE HTML>
<html class="center-html">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>就诊人列表</title>
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body class="center-body">
    <div class="site-name">
      <p>北京114预约挂号平台</p>
    </div>

    <div class="user-container">
      <div class="user-wrapper">
        <div class="user-title">
          <h4>就诊人(最多4人)</h4>
        </div>
        <div id="select">
        <!--<div class="user-list">-->
          <!--<div class="user-item">-->
            <!--<div class="user-info">-->
              <!--<h4>张三</h4>-->
              <!--<p>居民身份证 510292992929292929</p>-->
            <!--</div>-->

            <!--<div class="user-link">-->
              <!--<p>查看详情</p>-->
              <!--<i class="aui-iconfont aui-icon-right"></i>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="user-item">-->
            <!--<div class="user-info">-->
              <!--<h4>张三</h4>-->
              <!--<p>居民身份证 510292992929292929</p>-->
            <!--</div>-->

            <!--<div class="user-link">-->
              <!--<p>查看详情</p>-->
              <!--<i class="aui-iconfont aui-icon-right"></i>-->
            <!--</div>-->
          <!--</div>-->

          <!--<div class="user-item">-->
            <!--<div class="user-info">-->
              <!--<h4>张三</h4>-->
              <!--<p>居民身份证 510292992929292929</p>-->
            <!--</div>-->

            <!--<div class="user-link">-->
              <!--<p>查看详情</p>-->
              <!--<i class="aui-iconfont aui-icon-right"></i>-->
            <!--</div>-->
          <!--</div>-->

      </div>
          <div class="user-add">
            <a href="add.html">+ 添加就诊人</a>
          </div>
        </div>
      </div>
    </div>


</body>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/url.js"></script>
<script type="text/javascript">
  $.ajax({
    Type: "post",
    url: getUrl() + "wechat114/patient/select",
    success: function (data) {
    var cl=["a","b","c","d"];
    var length = data.data.length;
    var str="";
    for (var i=0; i<length; i++) {
      str += "   <div class=\"user-item\">\n" +
              "            <div class=\"user-info\">\n" +
              "              <h4>" + data.data[i].patientName + "</h4>\n" +
              "              <p>居民身份证 " + data.data[i].patientIdnumber + "</p>\n" +
              "            </div>\n" +
              "\n" +
              "            <div class=\"user-link\">\n" +
              "              <p id="+cl[i]+">查看详情</p>\n" +
              "              <i class=\"aui-iconfont aui-icon-right\"></i>\n" +
              "            </div>\n" +
              "          </div>"
    }
      $("#select").html(str);
        //点击跳转到详细信息
        $("#select").delegate("#a", "click", function () {
            window.location.replace("select.html?patientId="+data.data[0].patientId);
        })
        $("#select").delegate("#b", "click", function () {
            window.location.replace("select.html?patientId="+data.data[1].patientId);
        })
        $("#select").delegate("#c", "click", function () {
            window.location.replace("select.html?patientId="+data.data[2].patientId);
        })
        $("#select").delegate("#d", "click", function () {
            window.location.replace("select.html?patientId="+data.data[3].patientId);
        })
    }
  })
</script>
</html>
